package com.liuzhilong.infrastructure.basic.state;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class Host {
    //代表一个某个状态
    private State state;

    /**
     *  宿主的状态信息
     */
    public void hostDoSome(){
        System.out.println("当前状态计算结果"+this.state.action(this));
    }

    public static final Host create(State initSate){
        return new Host().setState(initSate);
    }
}
